<div class="clearfix row-main" ng-controller="powerCopyCtrl">

	<div class='panel'>
		<div class="panel-heading clearfix" style="margin-bottom:20px;" >
			<ul id='typeNav' class='nav nav-tabs pull-left'>
				<li data-type='internal' class="active"><a href="javascript:void(0)" > 拷贝菜单</a></li>
			</ul>
			<div class="panel-actions">
			</div>
		</div>
		
					<form class="form-horizontal" role="form" id="form" >
						<div class="form-group">
				          <label class="col-md-2 control-label required">权限名称</label>
				          <div class="col-md-4">
				             <input type='text' name="power.power_name" ng-model='power_name' class='form-control'  />
				          </div>
				        </div>
						
						<div class="form-group">
							<label class="col-sm-2 control-label">上级菜单</label>
							<div class="col-sm-4" style="position:relative;">
								<input readonly type="text" ng-click="show_tree()" id="father_id" ng-model='father_name' style="cursor:pointer;" class="form-control" />
								<div id="tree_box" class="tree_box col-sm-5" ng-show='showTree'>
									<ul class="tree tree-lines" id="power_tree" data-ng-init="init()">
									  <li class='has-list' ng-repeat="powerOne in powerList" ng-if="powerOne.father_id=== '0'" >
									  	<i class="list-toggle icon"></i>
									    <a href="#" ng-bind="powerOne.power_name" ng-click='selectfather($event)' attr-id='{{powerOne.id}}' ></a>
									    <ul>
									      <li ng-repeat="powerTwo in powerList" ng-if="powerTwo.father_id === powerOne.id " >
									      	<a href="#" ng-bind="powerTwo.power_name" ng-click='selectfather($event)' attr-id='{{powerTwo.id}}'></a>
									      </li>
									    </ul>
									  </li>
									</ul>
								</div>
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-md-2 control-label required">权限代码</label>
							<div class="col-md-4">
								<input type="text" name="power.permission" ng-model='permission' class='form-control' />
							</div>
						</div>
						<div class="form-group">
							<label class="col-md-2 control-label required"> url</label>
							<div class="col-md-4">
								<input type="text" name="power.url" ng-model='url' class="form-control" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-md-2 control-label">类型</label>
							<div class="col-md-4">
								<label class="radio-inline">
								  <input type="radio" name="power.type" ng-click="type_click()" checked="checked" value="M" class="" /> 菜单
								</label>
								<label class="radio-inline">
								  <input type="radio" name="power.type" ng-click="type_click()" value="O" class="" /> 操作
								</label>
							</div>
						</div>
						<div class="form-group">
							<label class="col-md-2 control-label"> 权限图标</label>
							<div class="col-md-4">
								<input type="text" name="power.ico" ng-model='ico' class="form-control" />
							</div>
						</div>
						<div class="form-group" ng-hide="typeState">
							<label class="col-md-2 control-label"> 图标样式</label>
							<div class="col-md-4">
								<input type="text" name="power.ico_bg" ng-model='ico_bg' class="form-control" />
							</div>
						</div>
						<div class="form-group" ng-hide="typeState" >
							<label class="col-md-2 control-label required"> 显示位置</label>
							<div class="col-md-4">
								<label class="checkbox-inline">
								  <input type="checkbox" name="power.position" value="top" class="" /> 头部
								</label>
								<label class="checkbox-inline">
								  <input type="checkbox" name="power.position" value="middle" class="" /> 行间
								</label>
							</div>
						</div>
						<div class="form-group">
							<label class="col-md-2 control-label" for="used"> 启用</label>
							<div class="col-md-4">
								<label class="radio-inline">
								  <input type="radio" name="power.used" id="used1"  value="1" checked="checked" class=""/> 是
								</label>
								<label class="radio-inline">
								  <input type="radio" name="power.used" id="used2"  value="0" class="" /> 否
								</label>
							</div>
						</div>
						<div class="form-group" ng-show="typeState">
							<label class="col-md-2 control-label"> 根菜单</label>
							<div class="col-md-4">
								<label class="radio-inline">
								  <input type="radio" name="power.root" id="root1"  value="1" checked="checked" class=""/> 是
								</label>
								<label class="radio-inline">
								  <input type="radio" name="power.root" id="root2"  value="0" class="" /> 否
								</label>
							</div>
						</div>
						<div class="form-group">
							<label class="col-md-2 control-label"> 排序序号</label>
							<div class="col-md-4">
								<input type="text" id="seq" name="power.seq" ng-model='seq' class="form-control" />
							</div>
						</div>
						<div class="form-group" style="margin-bottom:0;">
							<label class="col-md-2 control-label"></label>
							<div class="col-md-4">
								<div id='formError' class='alert alert-danger hiding'></div>
							</div>
						</div>
						
						<div class="form-group">
				          <div class="col-md-offset-2 col-md-10">
				             <input type="submit" class='btn btn-primary' value='保存' data-loading='稍候...'  ng-click="save()" />
				             <a href='javascript:void(0)'  class='btn' ui-sref="power" >返回</a>
				          </div>
				        </div>
					</form>
	</div>
</div>